﻿<UserControl x:Class="CodeMetrics.UserControls.ComplexityView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Adornments="clr-namespace:CodeMetrics.Adornments" mc:Ignorable="d">
    <UserControl.Resources>
        <Adornments:ComplexityToColor x:Key="toColor"/>
    </UserControl.Resources>
    <Grid>
        <Ellipse Height="20" Width="20" Fill="{Binding Value, Converter={StaticResource toColor}}" />
        <TextBlock Text="{Binding Value}" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold"/>
    </Grid>
</UserControl>